<?php 
use Yii\helpers\Html;
use yii\bootstrap\Nav;


//菜单
$menuItem = [];
if ($access = Yii::$app->params['access']) {
    isset($access['SYSTEM']['INDEX']) && $menuItem[] = ['label' => '基础信息', 'url' => ['/system/index']];
    //isset($access['SYSTEM']['THEME']) && $menuItem[] = ['label' => '主题', 'url' => ['/system/theme']];
    isset($access['SYSTEM']['EMAIL']) && $menuItem[] = ['label' => '邮件服务器设置', 'url' => ['/system/email']];
    isset($access['SYSTEM']['TOPNAV']) && $menuItem[] = ['label' => '顶部导航', 'url' => ['/system/topnav']];
    isset($access['SYSTEM']['BOTTOMNAV']) && $menuItem[] = ['label' => '底部导航', 'url' => ['/system/bottomnav']];
    isset($access['SYSTEM']['CONSULT']) && $menuItem[] = ['label' => '客服', 'url' => ['/system/consult']];
    isset($access['SYSTEM']['SIDEBAR']) && $menuItem[] = ['label' => '侧边栏', 'url' => ['/system/sidebar']];
    isset($access['SYSTEM']['SHARE']) && $menuItem[] = ['label' => '分享', 'url' => ['/system/share']];
} else {
    $menuItem = [
        ['label' => '基础信息', 'url' => ['/system/index']],
        //['label' => '主题', 'url' => ['/system/theme']],
        ['label' => '邮件服务器设置', 'url' => ['/system/email']],
        ['label' => '顶部导航', 'url' => ['/system/topnav']],
        ['label' => '底部导航', 'url' => ['/system/bottomnav']],
        ['label' => '客服', 'url' => ['/system/consult']],
        ['label' => '侧边栏', 'url' => ['/system/sidebar']],
        ['label' => '分享', 'url' => ['/system/share']],
    ];
}


echo Nav::widget([
    'options' => ['class' => 'nav nav-tabs mbm'],
    'items' => $menuItem,
]);

?>